package me.zhanghai.ohos.materialratingbar;

import me.zhanghai.harmmony.materialratingbar.BuildConfig;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class Log {

    private static final boolean IS_DEBUG = BuildConfig.DEBUG;

    private static final HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP,0x2131,"MaterialRatingBar_LOG");

    public static void e(String tag,String msg){
        if (IS_DEBUG){
            HiLog.error(LABEL,"tag: %{public}s ; msg: %{public}s ",tag,msg);
        }
    }
    public static void e(String tag,String msg,Throwable throwable){
        if (IS_DEBUG){
            HiLog.error(LABEL,"tag: %{public}s ; msg: %{public}s ; error: %{public}s",tag,msg,throwable.getMessage());
        }
    }
    public static void d(String tag,String msg){
        if (IS_DEBUG){
            HiLog.debug(LABEL,"tag: %{public}s ; msg: %{public}s ",tag,msg);
        }
    }
}
